#include "myhead.h"
//增加ip
void ip_add(const char *newip,int port,int fd,const char *name)
{
    ip *n = malloc(sizeof(ip));
    n = fd;
    strncpy(n->data.ip, newip, sizeof(n->data->ip));
    n->data->port = port;
    pthread_mutex_lock(&g_list_mtx);
    n->next = g_list;
	strncpy(n->name, name, sizeof(n->name));
    g_list = n;
    pthread_mutex_unlock(&g_list_mtx);
}
